|
deleteRemoveHandler
|
deleteRemoveHandler ( self, handler )
Delete trigger handler for removing models
|
|
addAddHandler
|
addAddHandler (
self,
func,
data,
)
Add trigger handler for adding models
|
|
registerPostGraphicsFunc
|
registerPostGraphicsFunc ( func )
Register a function to execute when the graphics state is ready
|
|
close
|
close (
self,
models,
checkForChanges=True,
)
Close models and remove from list of open models.
close(models) => None
|
|
open
|
open (
self,
filename,
type=None,
baseId=OpenModels.Default,
subid=OpenModels.Default,
sameAs=None,
shareXform=1,
hidden=0,
defaultType=None,
prefixableType=0,
skipViewAll=0,
checkForChanges=True,
*args,
*kw,
)
Read in a file and add the models within.
open(filename, type=None, [add arguments,] args, *kw) -> [model(s)]
If the type is given, then then open handler for that type is
used. Otherwise the filename suffix is examined to determine
which open function to call. See the add documentation above.
Exceptions
|
|
ValueError, "unknown default type"
IOError, "Compressed %s files are not handled automatically.\n" "You need to decompress such files manually before using them." % type
ValueError, "Unknown model type"
|
|
|
findfile
|
findfile ( filename, category="" )
|
|
isModel
|
isModel ( obj )
Return if obj is a model.
|
|
testDrawMode
|
testDrawMode (
e,
op,
value,
)
add draw mode testing capability to OSL
|
|
makePseudoBondsToMetals
|
makePseudoBondsToMetals ( models )
Replace normal bonds with pseudobonds for coordinated metals.
makePseudoBondsToMetals(models) => numAtoms, deletedBonds
|
|
testElement
|
testElement (
e,
op,
value,
)
add element testing capability to OSL
Exceptions
|
|
SyntaxError, 'comma not allowed in element name'
|
|
|
add
|
add (
self,
models,
baseId=OpenModels.Default,
subid=OpenModels.Default,
sameAs=None,
shareXform=1,
hidden=0,
skipViewAll=0,
checkForChanges=False,
)
Add models to the list of open models.
add(models, sameAs=None, hidden=0) => None
baseId is the base model id to start numbering models with.
sameAs is an existing model that all of the new models should
share the same id and subid.
If shareXform is true, then initialize the model's transformation
matrix to be the same as the lowest positively numbered model
(if not baseId specified) or the lowest numbered model with the
same baseId. (Using sameAs overrides shareXform).
If hidden is true, that means that the given models do not
normally appear when listed.
|
|
registerOSLTests
|
registerOSLTests ()
|
|
deleteAddHandler
|
deleteAddHandler ( self, handler )
Delete trigger handler for adding models
|
|
makePythonAtomsBondsResidues
|
makePythonAtomsBondsResidues ( models )
Create Python objects for atoms, bonds and residues.
makePythonAtomsBondsResidues(models) => None
|
|
testColor
|
testColor (
c,
op,
s,
)
import oslParser
add color testing capability to OSL
Exceptions
|
|
SyntaxError, 'comma not allowed in color name'
|
|
|
addOpenFinishedHandler
|
addOpenFinishedHandler (
self,
func,
data,
)
Add trigger handler for when a model is
finished opening
|
|
addRemoveHandler
|
addRemoveHandler (
self,
func,
data,
)
Add trigger handler for removing models
|
|
addModelClosedCallback
|
addModelClosedCallback ( model, callback )
Invoke a callback when a specified model is closed.
The callback is only called when the given model is closed.
The callback is automattically removed after it is called.
The callback is passed one argument, the closed model.
|
|
runCommand
|
runCommand ( *args, *kw )
convenience for programming...
|
|
closeAllModels
|
closeAllModels (
self,
trigger=None,
closure=None,
triggerData=None,
)
close non-hidden models first, so that "internal chain"
pseudobond groups can get removed by callbacks from
the C++ layer. Then close all remaining models. also, delay closure to the end of APPQUIT triggers, so that
other modules have opportunity to de-register from model-
closing triggers via APPQUIT
|
|
selectionOperation
|
selectionOperation ( sel )
|
|
checkKsdssp
|
checkKsdssp (
trigName,
myData,
models,
)
|
|
countAtomsAndResidues
|
countAtomsAndResidues ( models )
Count the total number of atoms and residues in the given models.
countAtomsAndResidues(models) => numAtoms, numResidues
|
|
list
|
list (
self,
id=OpenModels.Default,
subid=OpenModels.Default,
modelTypes=[],
hidden=0,
all=0,
)
List models from the list of open models.
list(id = None, hidden=0, all=0, modelTypes=[]) => [models]
id is a model identifier (an integer). If hidden is true,
then the hidden models are returned. If all is true, then
both hidden and non-hidden models are returned. modelTypes
is a list of model types (see the global list modelTypes)
that restricts the types of the models returned.
|
|
remove
|
remove ( self, models )
Remove models from the list of open models.
remove(models) => None
|
|
systemPDBdir
|
systemPDBdir ()
|
|
initializeGraphics
|
initializeGraphics ()
|
|
oslLevel
|
oslLevel ( obj )
Return OSL level of object or None.
The OSL level is one of SelGraph, SelSubgraph, SelVertex, SelEdge.
|
|
delOpenFinishedHandler
|
delOpenFinishedHandler ( self, handler )
Delete trigger handler when model is finished opening
|
|